import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
 * @author matias
 *
 */
public class Dbdif {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Mediador med;
		String host1,user1,pwd1,schema1,db1;
		String host2,user2,pwd2,schema2,db2;
		
		try {
			med = new Mediador();
			System.out.println("\n");
			db1 = getConnectionData("Base de Datos 1:");
			schema1 = getConnectionData("Schema1:");
			host1 = getConnectionData("Host:");
			user1 = getConnectionData("Usuario:");
			pwd1 = getConnectionData("Password:");
			med.cargarBDuno(host1,user1,pwd1,db1,schema1);
			System.out.println("\n");
			db2 = getConnectionData("Base de Datos 2:");
			schema2 = getConnectionData("Schema2:");
			host2 = getConnectionData("Host:");
			user2 = getConnectionData("Usuario:");
			pwd2 = getConnectionData("Password:");
			med.cargarBDdos(host2,user2,pwd2,db2,schema2);
			// Create Mediator
			med.comparador();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	private static String getConnectionData(String data) throws IOException{
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		System.out.print(data);
		return br.readLine();
	}
}